1. Field
Various features relate to the protection of keys in a key pairing exchange, and more particularly to improving security algorithms that employ self-inverting operations.
2. Background
High-bandwidth Digital Content Protection (HDCP) is an encryption protocol for copy-protected video content and is incorporated into digital video connection interfaces to block unauthorized transmission and reproduction of such content. With the release of HDCP versions 2.0 and 2.1, HDCP became interface-independent, and can be applied to any two way digital transmission between sources and displays, wired or wireless, compressed or uncompressed. The HDCP protocol comprises three phases: authentication, content encryption, and renewability.
During the authentication phase, encrypted messages and public keys are exchanged between an HDCP transmitter and an HDCP receiver to determine the receiver's identity and eligibility to accept protected content. If authentication is deemed successful, the transmitter proceeds to a content encryption phase. The transmitter encrypts protected audio and/or video (A/V) content using a master key Km (i.e., pairing master key) typically generated as part of a key exchange protocol in the authentication phase.
However, some receivers may be computationally limited and may not include or have write access to non-volatile storage/memory, thereby preventing the receiver from generating and/or storing the master key Km. Without knowledge of the master key Km, the receiver is unable to decrypt the encrypted A/V content.
FIG. 1 illustrates an example of the authentication phase between a transmitter device 102 and a receiver device 104. A transmitter device 102 is provisioned with a public key Kpub-tx and corresponding private key Kpri-tx. Similarly, the receiver device 104 is provisioned with or generates a public key Kpub-rx and corresponding private key Kpri-rx 108 along with a receiver secret key Kh 110. During the authentication stage (which includes a key exchange), the transmitter device 102 sends its public key Kpub-tx to the receiver device 104 and the receiver device 104 sends 112 its public key Kpub-rx to the transmitter device 102. Note that, where the receiver device 104 does not include non-volatile memory, the public key Kpub-rx, corresponding private key Kpri-rx, and receiver secret key Kh may be generated by the receiver device 104 for a particular power cycle or session.
In this security system, the transmitter device 102 may be provisioned with master keys corresponding to each receiver device. However, in some instances there is no corresponding master key for a receiver device (e.g., the receiver device does not have non-volatile memory). Consequently, the receiver device 104 may receive a message from the transmitter device 102 indicating that it does not have the master key Km. corresponding to the receiver device.
As a result, transmitter device 102 may provide a master key Km to the receiver device 104. The transmitter device 102 encrypts 116 the master key Km with the receiver's public key Kpub-rx and generates a nonce m 118. The encrypted master key and nonce Expub-rx(Km, nonce m) are sent 120 to the receiver device 104. The receiver device 104 then decrypts 122 the encrypted master key and nonce m using its private key Kpriv-rx. The nonce m may be used to generate an initialization vector (IV). The receiver device 104 then encrypts 124 the master key Km using its own secret key Kh, the received nonce m, and using an Advanced Encryption Standard (AES) block cipher. For example, the AES block cipher may be AES-128 (Advanced Encryption Standard 128 bit algorithm) in counter (CTR) mode:Encrypt Km=EKh,m(Km)=AESCTR Mode[Kh](m)⊕Km.
The receiver device 104 then sends this encrypted master key EKh, m(Km) to the transmitter device 102. This encrypted master key EKh, m(Km) may be stored by the transmitter device 102 and used for subsequent handshakes between the transmitter device 102 to the receiver device 104. At subsequent handshakes, the transmitter device 102 sends 127 the encrypted master key E(Kh)(Km) with the nonce m, so that the receiver device 104 can decrypt it and verify that it is the same encrypted master key the receiver previously sent, thereby authenticating the transmitter.
The HDCP 2 protocol (versions 2.0 and 2.1) has a vulnerability by which a Man-In-The-Middle (MITM) (intercepting device 128) can intercept 130 the transmission 127 involving the master key Km between the transmitter device 102 and the receiver device 104 and abuse the receiver device 104 to decrypt this master key Km. However, the transmitted EKh, m(Km) 127, is just the XOR of the mast key Km with the receiver's secret Kh and the nonce m. An attacker would intercept this transmission 127 of E(Kh)(Km), initiate its own session 132 with the receiver device 104. The intercepting device 128 poses as a transmitter in this new session.
The intercepting device 128 may receive 132 the receiver devices's public key Kpub-rx and uses to encrypt the intercepted encrypted master key EKm, m(Km) and nonce m 136 for transmission 138 to the receiver device 104. The receiver device 104 then decrypts 140 EKpub-rx(EKh, m(Km), m) using its private key Kpriv-rx. The receiver device 104 then encrypts EKm, m(Km) using its receiver secret key Kh and nonce m as follows:
                              Encrypt          ⁢                                          ⁢                                    E                              Kh                ,                m                                      ⁡                          (                                                E                                      Kh                    ,                    m                                                  ⁡                                  (                                      K                    m                                    )                                            )                                      =                ⁢                              A            ⁢                                                  ⁢            E            ⁢                                                  ⁢                          S              ⁡                              [                                  K                  h                                ]                                      ⁢                          (              m              )                                ⊕                      (                                          E                                  Kh                  ,                  m                                            ⁡                              (                                  K                  m                                )                                      )                                                  =                ⁢                              A            ⁢                                                  ⁢            E            ⁢                                                  ⁢                          S              ⁡                              [                                  K                  h                                ]                                      ⁢                          (              m              )                                ⊕                      A            ⁢                                                  ⁢            E            ⁢                                                  ⁢                          S              ⁡                              [                                  K                  h                                ]                                      ⁢                          (              m              )                                ⊕                      K            m                                                  =                ⁢                              K            m                    .                    
The receiver device 104 the sends then back 144 E(Kh)(E(Kh)(Km)) which is just Km. Consequently, the intercepting device 128 is able to obtain the master key Km due to the self-inverting nature of the encryption used by the receiver device 104. With the master key Km, the intercepting device 128 may be able to decode encrypted content that the transmitter device 102 may send to the receiver device 104.
Therefore, an improved security measure is needed that prevent an intercepting device from exploiting the weaknesses of the encryption used by the receiver device.